<?php
class Zendvn_Paginator {

	public function createPaginator( $totalItem, $arrPaginator, $options = null) {
		$adapter = new Zend_Paginator_Adapter_Null($totalItem);
		
		$paginator = new Zend_Paginator($adapter);
		
		$itemCountPerPage = $arrPaginator['ItemCountPerPage'];
		$paginator->setItemCountPerPage($itemCountPerPage);
		
		$pageRange = $arrPaginator['PageRange'];
		$paginator->setPageRange($pageRange);
		
		$paginator->setCurrentPageNumber($arrPaginator['currentPage']);
		
		return $paginator;
	}

}
